package com.hfjy.jython.scala.demo.ml
import breeze.linalg._
import breeze.numerics._
class Demo1 {
  def d1(): Unit ={
    println("----------------------")
    var unit = DenseMatrix.zeros[Double](2,3)
    println(unit)

    println("----------------------")
    var v1=DenseVector.zeros[Double](3)
    println(v1)

    println("-----DenseVector.ones-----------------")
    var one1=DenseVector.ones[Double](3)
    println(one1)

    println("-------DenseVector.fill---------------")
    var fill=DenseVector.fill(3){5.0}
    println(fill)

    println("-----DenseVector.range-----------------")
    var r1=DenseVector.range(1,10,2)
    println(r1)

    println("----------DenseMatrix.eye------------")
    var eye=DenseMatrix.eye[Double](4)
    println(eye)

    println("----------------------")
    println("-------------------")
    var t1=DenseVector(Array(1,2,3,4))
    println(t1)

    println("----------------------")
    var t2=DenseVector.rand(4)
    println(t2)

    println("----------------------")
    var t3=DenseMatrix.rand(4,3)
    println(t3)
  }
}
